package com.gxuwz.bignews.controller;

import android.content.Context;

import com.gxuwz.bignews.model.db.UserDao;
import com.gxuwz.bignews.model.entity.User;

public class RegisterController {
    private UserDao userDao;

    public RegisterController(Context context) {
        userDao = new UserDao(context);
    }

    public boolean isPhoneRegistered(String phone) {
        return userDao.isPhoneRegistered(phone);
    }

    public boolean registerUser(String username, String phone, String password) {
        User user = new User(phone, username, password);
        return userDao.registerUser(user);
    }
} 